<?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');
/**
 * View file: category
 *
 * @author luubk
 * @since 12-06-2012 - 01:15:30
 */
?>
<?php if(isset($noti)): ?>
<h4 class="alert_success"><?php echo $noti ?></h4>
<?php endif; ?>
<article class="module width_full" >
    <header>
        <h3><?php echo $title ?></h3>
    </header>
    <table class="tablesorter" cellspacing="0"> 
        <thead> 
            <tr>
                <th>ID</th> 
                <th>Tên sự kiện</th>    
                <th>Ảnh đại diện</th>                    
                <th>Thời gian bắt đầu</th>                                
                <th>Thời gian kết thúc</th> 
                <th>Tags</th> 
                <th>Trạng thái</th> 
            </tr> 
        </thead> 
        <tbody> 
            <?php if ($items): ?>                
                <?php $cates = $items ?>                
                <?php foreach ($items as $item): ?>
                    <tr>                             
                        <td><?php echo $item['event_id'] ?></td> 
                        <td><?php echo $item['event_title'] ?></td>                                                
                        <td> 
                            <?php
                            $thumb = ($item['event_thumb'] != '') ? site_url('photo/gate/' . urlencode(urlencode(urlencode($item['event_thumb'])))) : base_url() . 'assets/css/_common/images/image.png';                            
                            ?>
                            <img src="<?php echo $thumb ?>" 
                                 style="max-height:30px;max-width:50px"/>
                        </td>                                                
                        <td><?php echo date('Y-m-d H:i:s', $item['event_start']) ?></td>                        
                        <td><?php echo date('Y-m-d H:i:s', $item['event_end']) ?></td> 
                        <td><?php echo $item['event_tags'] ?></td> 
                        <td>
                            <?php echo edit_text('event/form/' . $item['event_id']) ?>
                            <?php echo delete_text('event/delete/' . $item['event_id']) ?>
                        </td> 
                    </tr>        
                <?php endforeach; ?>
            <?php else: ?>
                <tr>
                    <td colspan="5">Không có dữ liệu</td>
                </tr>
            <?php endif; ?>                               
        </tbody> 
    </table>
    <footer>
        <p><?php echo $paging ?></p>
    </footer>
</article><!-- end of content manager article -->

